<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no, viewport-fit=cover" />
    <title>预约订单</title>
</head>
<link rel="stylesheet" type="text/css" href="css/public.css" />
<script src="js/jquery1.42.min.js"></script>
<script type="text/javascript" src="js/jdate.min.js"></script>

<body class="appoint-order">
    <!--头部-->
   <!-- <header >
        <div class="title"><a class="nav-btn" href="index.html"></a><span>订单结算</span></div>
    </header>-->

    <div  class="appoint-order-detail">
        <img src="img/drama7.jpg"/>
        <div class="order-detail-box">
            <div class="order-name ellipsis">布达拉宫风云</div>
            <div class="order-summary ellipsis">话剧指以对话方式为主的戏剧形式，于19世纪末20世纪初来到中国。</div>
            <div class="order-price-wrap">
                <span class="selling-price" style="color: rgb(51, 51, 51);">￥9999</span>
                <span class="pay gopay">门店支付</span>
            </div>
        </div>
    </div>

    <!--表单-->
    <div class="appoint-num">
        <div>数量</div>
        <ul class="btn-numbox">
           <!-- <li><span class="number">数量</span></li>-->
            <li>
                <ul class="count">
                    <li><span id="minus" class="num-jian">-</span></li>
                    <li><input type="text" class="input-num" id="inputNum" value="0" /></li>
                    <li><span id="plus" class="num-jia">+</span></li>
                </ul>
            </li>
            <li><span class="kucun">（库存:<i id="total">5</i>）</span></li>
        </ul>
    </div>

    <div class="appoint-contact-info">
        <!--姓名-->
       <div class="contact-item">
           <div class="contact-name">
               <span class="item-must">*</span>
               姓名
           </div>
           <div class="contact-tel ">
               <input type="text" maxlength="100" placeholder="请输入姓名" class="jz-input">
           </div>
       </div>
        <!--手机-->
        <div class="contact-item">
            <div class="contact-name">
                <span class="item-must">*</span>
                手机
            </div>
            <div class="contact-tel ">
                <input type="text" maxlength="100" placeholder="请输入手机号码" class="jz-input">
            </div>
        </div>
        <!--日期-->
        <div class="contact-item">
            <div class="contact-name">
                <span class="item-must">*</span>
                日期
            </div>
            <div class="contact-tel " style="padding: 0 10px">
            <input readonly class="form-control" type="text" id="date-group1-2" placeholder="YYYY-MM-DD">
            </div>
        </div>

        <!--留言-->
        <div class="contact-item mg-top-10">
            <div class="contact-name">
                <span class="item-must">*</span>
                留言
            </div>
            <div class="contact-tel">
                <textarea placeholder="请输入买家留言" maxlength="999" class="input-textarea-inner jz-input" rows="5"></textarea>
            </div>
        </div>
    </div>

    <!--底部-->
    <footer class="footer">
        <div class="nav-item"><span>￥</span><span>999</span></div>
        <button class="extra-btn" id="subOrderBtn">提交订单</button>
    </footer>

    <!--提示确认提交的弹框 -->
    <section class="tk-box" id="tkBox">
        <div class="section">
            <div class="container">
                <div class="modal">
                    <h2 class="tk-title" >提醒</h2>
                    <p class="tk-content">确定要提交吗？</p>
                    <div class="tk-footer-cn">
                        <a href="javascript:;" class="tk-footer" id="goBack">取消</a>
                        <a href="javascript:;" class="tk-footer" id="sure">确定</a>
                    </div>
                </div>
            </div>
            <!--遮罩层-->
            <div class="fullScreen"></div>
        </div>
    </section>

    <script type="text/javascript">
        $(function(){

            /*表单数量增加减少*/
            var t = $('#inputNum');/*  数量显示框*/
            $('#plus').click(function(){
                if(t.val()<$('#total').text()){/* 数量最大不能超过商品库存量 */
                    t.val(parseInt(t.val())+1);
                }else{
                    t.val($('#total').text());
                }
                t.change() ;
            })
            $('#minus').click(function(){
                if(t.val()<=1){	/*数量最少为1  */
                    t.val(1);
                }else{
                    t.val(parseInt(t.val())-1);
                }
                t.change()
            })

            /*提交订单*/
            $("#subOrderBtn").click(function(){
                $("#tkBox").show() ;
            })

            /*提示框取消*/
            $("#goBack").click(function(){
                $("#tkBox").hide() ;
            })

            /*确定提交*/
            $("#sure").click(function(){
                window.location.href = "ordersubsuccess.html" ;
            })

            new Jdate({
                el: '#date-group1-2',
                format: 'YYYY-MM-DD',
                beginYear: 2000,
                endYear: 2100
            })

        });
    </script>
</body>